package com.fengycx.app;

import cn.dev33.satoken.annotation.SaIgnore;
import com.fengycx.pojo.dto.LoginParamDto;
import com.fengycx.result.R;
import com.fengycx.service.ILoginService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

@RestController
@RequestMapping("/app/wechat")
public class AppLoginController {


    @Autowired
    private ILoginService loginService;


    @Operation(summary = "小程序微信登录",description = "小程序微信登录接口")
    @Parameter(name = "LoginParamDto",description = "登录信息对象",required = true)
    @PostMapping("/appLogin")
    @SaIgnore
    public R<Boolean> appLogin(@RequestBody @Valid LoginParamDto param){
        return R.success(loginService.appLogin(param));
    }
}
